3.37 \(\int \sin ^4(e+f x) (a+b \tan ^2(e+f x)) \, dx\)

Optimal. Leaf size=74 \[ \frac{(a-b) \sin (e+f x) \cos ^3(e+f x)}{4 f}-\frac{(5 a-9 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{3}{8} x (a-5 b)+\frac{b \tan (e+f x)}{f} \]

[Out]

(3*(a - 5*b)*x)/8 - ((5*a - 9*b)*Cos[e + f*x]*Sin[e + f*x])/(8*f) + ((a - b)*Cos[e + f*x]^3*Sin[e + f*x])/(4*f
) + (b*Tan[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.0733339, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {3663, 455, 1157, 388, 203} \[ \frac{(a-b) \sin (e+f x) \cos ^3(e+f x)}{4 f}-\frac{(5 a-9 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{3}{8} x (a-5 b)+\frac{b \tan (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^4*(a + b*Tan[e + f*x]^2),x]

[Out]

(3*(a - 5*b)*x)/8 - ((5*a - 9*b)*Cos[e + f*x]*Sin[e + f*x])/(8*f) + ((a - b)*Cos[e + f*x]^3*Sin[e + f*x])/(4*f
) + (b*Tan[e + f*x])/f

Rule 3663

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff^(m + 1))/f, Subst[Int[(x^m*(a + b*(ff*x)^n)^p)/(c^2 + ff^2*x^2
)^(m/2 + 1), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2]

Rule 455

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[(a + b*x^2)^(p + 1)*E
xpandToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)]
- (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[
m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 1157

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQ
uotient[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2,
x], x, 0]}, -Simp[(R*x*(d + e*x^2)^(q + 1))/(2*d*(q + 1)), x] + Dist[1/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1)*
ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && N
eQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^4 \left (a+b x^2\right )}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a-b) \cos ^3(e+f x) \sin (e+f x)}{4 f}-\frac{\operatorname{Subst}\left (\int \frac{a-b-4 (a-b) x^2-4 b x^4}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 f}\\ &=-\frac{(5 a-9 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{(a-b) \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{\operatorname{Subst}\left (\int \frac{3 a-7 b+8 b x^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=-\frac{(5 a-9 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{(a-b) \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{b \tan (e+f x)}{f}+\frac{(3 (a-5 b)) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=\frac{3}{8} (a-5 b) x-\frac{(5 a-9 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{(a-b) \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{b \tan (e+f x)}{f}\\ \end{align*}

Mathematica [A]  time = 0.344238, size = 58, normalized size = 0.78 \[ \frac{12 (a-5 b) (e+f x)-8 (a-2 b) \sin (2 (e+f x))+(a-b) \sin (4 (e+f x))+32 b \tan (e+f x)}{32 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]^4*(a + b*Tan[e + f*x]^2),x]

[Out]

(12*(a - 5*b)*(e + f*x) - 8*(a - 2*b)*Sin[2*(e + f*x)] + (a - b)*Sin[4*(e + f*x)] + 32*b*Tan[e + f*x])/(32*f)

________________________________________________________________________________________

Maple [A]  time = 0.062, size = 102, normalized size = 1.4 \begin{align*}{\frac{1}{f} \left ( a \left ( -{\frac{\cos \left ( fx+e \right ) }{4} \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\sin \left ( fx+e \right ) }{2}} \right ) }+{\frac{3\,fx}{8}}+{\frac{3\,e}{8}} \right ) +b \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{7}}{\cos \left ( fx+e \right ) }}+ \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{5}+{\frac{5\, \left ( \sin \left ( fx+e \right ) \right ) ^{3}}{4}}+{\frac{15\,\sin \left ( fx+e \right ) }{8}} \right ) \cos \left ( fx+e \right ) -{\frac{15\,fx}{8}}-{\frac{15\,e}{8}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^4*(a+b*tan(f*x+e)^2),x)

[Out]

1/f*(a*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+b*(sin(f*x+e)^7/cos(f*x+e)+(sin(f*x+e)^5+
5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos(f*x+e)-15/8*f*x-15/8*e))

________________________________________________________________________________________

Maxima [A]  time = 1.58039, size = 111, normalized size = 1.5 \begin{align*} \frac{3 \,{\left (f x + e\right )}{\left (a - 5 \, b\right )} + 8 \, b \tan \left (f x + e\right ) - \frac{{\left (5 \, a - 9 \, b\right )} \tan \left (f x + e\right )^{3} +{\left (3 \, a - 7 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}}{8 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^4*(a+b*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

1/8*(3*(f*x + e)*(a - 5*b) + 8*b*tan(f*x + e) - ((5*a - 9*b)*tan(f*x + e)^3 + (3*a - 7*b)*tan(f*x + e))/(tan(f
*x + e)^4 + 2*tan(f*x + e)^2 + 1))/f

________________________________________________________________________________________

Fricas [A]  time = 1.95868, size = 176, normalized size = 2.38 \begin{align*} \frac{3 \,{\left (a - 5 \, b\right )} f x \cos \left (f x + e\right ) +{\left (2 \,{\left (a - b\right )} \cos \left (f x + e\right )^{4} -{\left (5 \, a - 9 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )} \sin \left (f x + e\right )}{8 \, f \cos \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^4*(a+b*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

1/8*(3*(a - 5*b)*f*x*cos(f*x + e) + (2*(a - b)*cos(f*x + e)^4 - (5*a - 9*b)*cos(f*x + e)^2 + 8*b)*sin(f*x + e)
)/(f*cos(f*x + e))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right ) \sin ^{4}{\left (e + f x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**4*(a+b*tan(f*x+e)**2),x)

[Out]

Integral((a + b*tan(e + f*x)**2)*sin(e + f*x)**4, x)

________________________________________________________________________________________

Giac [B]  time = 4.28335, size = 5873, normalized size = 79.36 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^4*(a+b*tan(f*x+e)^2),x, algorithm="giac")

[Out]

1/64*(3*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*ta
n(e))*tan(f*x)^5*tan(e)^5 + 24*a*f*x*tan(f*x)^5*tan(e)^5 - 120*b*f*x*tan(f*x)^5*tan(e)^5 + 3*pi*b*sgn(-2*tan(f
*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e)^5 + 6*pi*b*sgn(2*tan(f*x)^2*tan(
e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e)^3 - 3*pi*b
*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*
x)^4*tan(e)^4 + 6*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f
*x) - 2*tan(e))*tan(f*x)^3*tan(e)^5 + 6*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^5*tan(e)^
5 - 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^5*tan(e)^5 + 48*a*f*x*tan(f*x)^5*tan(e)^3
- 240*b*f*x*tan(f*x)^5*tan(e)^3 + 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e
))*tan(f*x)^5*tan(e)^3 - 24*a*f*x*tan(f*x)^4*tan(e)^4 + 120*b*f*x*tan(f*x)^4*tan(e)^4 - 3*pi*b*sgn(-2*tan(f*x)
^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^4*tan(e)^4 + 48*a*f*x*tan(f*x)^3*tan(e)^5 -
240*b*f*x*tan(f*x)^3*tan(e)^5 + 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))
*tan(f*x)^3*tan(e)^5 + 3*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 +
2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e) - 6*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*
tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^4*tan(e)^2 + 12*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2
*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^3*tan(e)^3 + 12*b*arctan((tan(f*x)
+ tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^5*tan(e)^3 - 12*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))
*tan(f*x)^5*tan(e)^3 - 6*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 +
2*tan(f*x) - 2*tan(e))*tan(f*x)^2*tan(e)^4 - 6*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^4*
tan(e)^4 + 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 24*a*tan(f*x)^5*tan(e)
^4 - 120*b*tan(f*x)^5*tan(e)^4 + 3*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*t
an(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)*tan(e)^5 + 12*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*ta
n(f*x)^3*tan(e)^5 - 12*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^5 + 24*a*tan(f*x
)^4*tan(e)^5 - 120*b*tan(f*x)^4*tan(e)^5 + 24*a*f*x*tan(f*x)^5*tan(e) - 120*b*f*x*tan(f*x)^5*tan(e) + 3*pi*b*s
gn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^5*tan(e) - 48*a*f*x*tan(f*x)^4
*tan(e)^2 + 240*b*f*x*tan(f*x)^4*tan(e)^2 - 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x)
 - 2*tan(e))*tan(f*x)^4*tan(e)^2 + 96*a*f*x*tan(f*x)^3*tan(e)^3 - 480*b*f*x*tan(f*x)^3*tan(e)^3 + 12*pi*b*sgn(
-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^3*tan(e)^3 - 48*a*f*x*tan(f*x)^2*
tan(e)^4 + 240*b*f*x*tan(f*x)^2*tan(e)^4 - 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x)
- 2*tan(e))*tan(f*x)^2*tan(e)^4 + 24*a*f*x*tan(f*x)*tan(e)^5 - 120*b*f*x*tan(f*x)*tan(e)^5 + 3*pi*b*sgn(-2*tan
(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)*tan(e)^5 - 3*pi*b*sgn(2*tan(f*x)^2*tan(
e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^4 + 6*pi*b*sgn(2*ta
n(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^3*tan(
e) + 6*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^5*tan(e) - 6*b*arctan(-(tan(f*x) - tan(e))
/(tan(f*x)*tan(e) + 1))*tan(f*x)^5*tan(e) - 12*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) +
2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^2*tan(e)^2 - 12*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*t
an(e) - 1))*tan(f*x)^4*tan(e)^2 + 12*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^2
+ 40*a*tan(f*x)^5*tan(e)^2 - 200*b*tan(f*x)^5*tan(e)^2 + 6*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)
^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)*tan(e)^3 + 24*b*arctan((tan(f*x) + tan(e))/(
tan(f*x)*tan(e) - 1))*tan(f*x)^3*tan(e)^3 - 24*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^3
*tan(e)^3 + 24*a*tan(f*x)^4*tan(e)^3 - 120*b*tan(f*x)^4*tan(e)^3 - 3*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-
2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(e)^4 - 12*b*arctan((tan(f*x) + tan(e))/
(tan(f*x)*tan(e) - 1))*tan(f*x)^2*tan(e)^4 + 12*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^
2*tan(e)^4 + 24*a*tan(f*x)^3*tan(e)^4 - 120*b*tan(f*x)^3*tan(e)^4 + 6*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*t
an(e) - 1))*tan(f*x)*tan(e)^5 - 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e)^5 + 40*
a*tan(f*x)^2*tan(e)^5 - 200*b*tan(f*x)^2*tan(e)^5 - 24*a*f*x*tan(f*x)^4 + 120*b*f*x*tan(f*x)^4 - 3*pi*b*sgn(-2
*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^4 + 48*a*f*x*tan(f*x)^3*tan(e) - 24
0*b*f*x*tan(f*x)^3*tan(e) + 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan
(f*x)^3*tan(e) - 96*a*f*x*tan(f*x)^2*tan(e)^2 + 480*b*f*x*tan(f*x)^2*tan(e)^2 - 12*pi*b*sgn(-2*tan(f*x)^2*tan(
e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^2*tan(e)^2 + 48*a*f*x*tan(f*x)*tan(e)^3 - 240*b*f*x
*tan(f*x)*tan(e)^3 + 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)*t
an(e)^3 - 24*a*f*x*tan(e)^4 + 120*b*f*x*tan(e)^4 - 3*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*t
an(f*x) - 2*tan(e))*tan(e)^4 - 6*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan
(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^2 - 6*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^4 +
 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^4 - 64*b*tan(f*x)^5 + 3*pi*b*sgn(2*tan(f*x)^2
*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)*tan(e) + 12*b*
arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^3*tan(e) - 12*b*arctan(-(tan(f*x) - tan(e))/(tan(f*
x)*tan(e) + 1))*tan(f*x)^3*tan(e) - 80*a*tan(f*x)^4*tan(e) + 80*b*tan(f*x)^4*tan(e) - 6*pi*b*sgn(2*tan(f*x)^2*
tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(e)^2 - 24*b*arctan((
tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^2*tan(e)^2 + 24*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan
(e) + 1))*tan(f*x)^2*tan(e)^2 - 96*a*tan(f*x)^3*tan(e)^2 - 160*b*tan(f*x)^3*tan(e)^2 + 12*b*arctan((tan(f*x) +
 tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)*tan(e)^3 - 12*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*ta
n(f*x)*tan(e)^3 - 96*a*tan(f*x)^2*tan(e)^3 - 160*b*tan(f*x)^2*tan(e)^3 - 6*b*arctan((tan(f*x) + tan(e))/(tan(f
*x)*tan(e) - 1))*tan(e)^4 + 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(e)^4 - 80*a*tan(f*x)*ta
n(e)^4 + 80*b*tan(f*x)*tan(e)^4 - 64*b*tan(e)^5 - 48*a*f*x*tan(f*x)^2 + 240*b*f*x*tan(f*x)^2 - 6*pi*b*sgn(-2*t
an(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)^2 + 24*a*f*x*tan(f*x)*tan(e) - 120*b*
f*x*tan(f*x)*tan(e) + 3*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e))*tan(f*x)*
tan(e) - 48*a*f*x*tan(e)^2 + 240*b*f*x*tan(e)^2 - 6*pi*b*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*ta
n(f*x) - 2*tan(e))*tan(e)^2 - 3*pi*b*sgn(2*tan(f*x)^2*tan(e)^2 - 2)*sgn(-2*tan(f*x)^2*tan(e) + 2*tan(f*x)*tan(
e)^2 + 2*tan(f*x) - 2*tan(e)) - 12*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)^2 + 12*b*arcta
n(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(f*x)^2 + 40*a*tan(f*x)^3 - 200*b*tan(f*x)^3 + 6*b*arctan((ta
n(f*x) + tan(e))/(tan(f*x)*tan(e) - 1))*tan(f*x)*tan(e) - 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1
))*tan(f*x)*tan(e) + 24*a*tan(f*x)^2*tan(e) - 120*b*tan(f*x)^2*tan(e) - 12*b*arctan((tan(f*x) + tan(e))/(tan(f
*x)*tan(e) - 1))*tan(e)^2 + 12*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1))*tan(e)^2 + 24*a*tan(f*x)*t
an(e)^2 - 120*b*tan(f*x)*tan(e)^2 + 40*a*tan(e)^3 - 200*b*tan(e)^3 - 24*a*f*x + 120*b*f*x - 3*pi*b*sgn(-2*tan(
f*x)^2*tan(e) + 2*tan(f*x)*tan(e)^2 + 2*tan(f*x) - 2*tan(e)) - 6*b*arctan((tan(f*x) + tan(e))/(tan(f*x)*tan(e)
 - 1)) + 6*b*arctan(-(tan(f*x) - tan(e))/(tan(f*x)*tan(e) + 1)) + 24*a*tan(f*x) - 120*b*tan(f*x) + 24*a*tan(e)
 - 120*b*tan(e))/(f*tan(f*x)^5*tan(e)^5 + 2*f*tan(f*x)^5*tan(e)^3 - f*tan(f*x)^4*tan(e)^4 + 2*f*tan(f*x)^3*tan
(e)^5 + f*tan(f*x)^5*tan(e) - 2*f*tan(f*x)^4*tan(e)^2 + 4*f*tan(f*x)^3*tan(e)^3 - 2*f*tan(f*x)^2*tan(e)^4 + f*
tan(f*x)*tan(e)^5 - f*tan(f*x)^4 + 2*f*tan(f*x)^3*tan(e) - 4*f*tan(f*x)^2*tan(e)^2 + 2*f*tan(f*x)*tan(e)^3 - f
*tan(e)^4 - 2*f*tan(f*x)^2 + f*tan(f*x)*tan(e) - 2*f*tan(e)^2 - f)